<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:o="http://openfaces.org/">


	<style type="text/css">
		.alignTop {
			vertical-align:top;
		}
	</style>
	
	<h:panelGroup id="transactionData">
		<rich:tabPanel switchType="client">
			<rich:tab label="#{messages['viewtransaction.presentation']}">
				<div align="center">
					<strong>#{messages['viewtransaction.receptionist']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<h:panelGrid columns="2" columnClasses="alignTop,alignTop">
						<h:outputText value="#{messages['viewtransaction.receptionist_username']}" />
						<h:outputText value="#{transactionController.receptionistUserName}" />
		
						<h:outputText value="#{messages['viewtransaction.receptionist_fullname']}" />
						<h:outputText value="#{transactionController.receptionistFullName}" />
					</h:panelGrid>
					<br/>
					<br/>
					<br/>
					<strong>#{messages['intro.partydata']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<h:panelGrid columns="2" columnClasses="alignTop,alignTop">
						<h:outputText value="#{messages['viewtransaction.presentation_date']}" />
						<h:outputText value="#{transactionController.presentationDate}" />
						
						<h:outputText value="#{messages['viewtransaction.presentation_id']}" />
						<h:outputText value="#{transactionController.presentationId}" />
		
						<h:outputText value="#{messages['intro.partyid']}" />
						<h:outputText value="#{transactionController.partyNationalIdentity}" />
						
						<h:outputText value="#{messages['intro.fullname']}" />
						<h:outputText value="#{transactionController.partyName}" />
						
						<h:outputText value="#{messages['intro.cashierscode']}" />
						<h:outputText value="#{transactionController.cashiersCode}" />
						
						<h:outputText value="#{messages['intro.payment']}" />
						<h:outputText value="#{transactionController.payment}" />
						
						<h:outputText value="#{messages['intro.description']}" />
						<h:outputText value="#{transactionController.description}" />
					</h:panelGrid>
					
					<br/>
					<br/>
					<br/>
					<strong>#{messages['introfin.attacheddocs']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<h:panelGroup rendered="#{empty transactionController.attachedFiles}">
						<br/>
						<h:outputText value="#{messages['intro2.nodocsattached']}"/>
					</h:panelGroup>
					<rich:dataTable id="attachedDocsTable" value="#{transactionController.attachedFiles}"
							var="file" rowKeyVar="row" rendered="#{not empty transactionProcess.attachedFiles}">
						<rich:column>
							<f:facet name="header">#{messages['intro2.description']}</f:facet>
							<h:outputText value="#{file.descripcion}"/>
						</rich:column>
		
						<rich:column>
							<f:facet name="header">#{messages['intro2.filename']}</f:facet>
							<h:outputText value="#{file.fileName}"/>
						</rich:column>
		
						<rich:column>
							<h:commandLink action="/seam/resource/documentviewer">
								<f:setPropertyActionListener target="#{documentViewer.documentPath}" value="#{file.fileName}"/>
								<f:setPropertyActionListener target="#{documentViewer.forceDownload}" value="#{true}"/>
								<h:outputText value="#{messages['viewtransaction.downloadattacheddoc']}"/>
							</h:commandLink>
							#{'  '}
							<h:commandLink action="/seam/resource/documentviewer" target="_blank">
								<f:setPropertyActionListener target="#{documentViewer.documentPath}" value="#{file.fileName}"/>
								<f:setPropertyActionListener target="#{documentViewer.forceDownload}" value="#{false}"/>
								<h:outputText value="#{messages['viewtransaction.viewattacheddoc']}"/>
							</h:commandLink>
						</rich:column>
					</rich:dataTable>
				</div>
			</rich:tab>
			
			<rich:tab label="#{messages['viewtransaction.analysis']}">
				<div align="center">
					<strong>#{messages['viewtransaction.analyst']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<h:panelGrid columns="2">
						<h:outputText value="#{messages['viewtransaction.analyst_username']}"/>
						<h:outputText value="#{transactionController.analystUserName}"/>
						
						<h:outputText value="#{messages['viewtransaction.analyst_fullname']}"/>
						<h:outputText value="#{transactionController.analystFullName}"/>
					</h:panelGrid>
					<br/>
					<br/>
					<strong>#{messages['analysis.type']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<h:panelGrid columns="2" columnClasses="alignTop,alignTop">
						<h:outputText value="#{messages['analysis.request_type']}" />
						<h:outputText value="#{resBundle.loadMessage(transactionController.requestType)}" />
						
						<h:outputText value="#{messages['analysis.request_subtype']}" />
						<h:outputText value="#{resBundle.loadMessage(transactionController.requestSubType)}" />
					</h:panelGrid>
					<br/>
					<br/>
					<strong>#{messages['analysis.property_list']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<rich:dataTable value="#{transactionController.parcelDataList}" var="parcelData" rowKeyVar="row">
						<rich:column>
							<f:facet name="header">Nombre</f:facet>
							<h:outputText value="#{parcelData.label}"/>
						</rich:column>
						<rich:column>
							<f:facet name="header">Ficha de campo</f:facet>
							<h:outputText value="#{parcelData.fieldTab}"/>
						</rich:column>
						<rich:column>
							<f:facet name="header">Clave municipal</f:facet>
							<h:outputText value="#{parcelData.municipalKey}"/>
						</rich:column>
						<rich:column>
							<f:facet name="header">Clave catastral</f:facet>
							<h:outputText value="#{parcelData.cadastralKey}"/>
						</rich:column>
					</rich:dataTable>
					<br/>
					<br/>
					<strong>#{messages['analysis.request_dictum']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<rich:editor readonly="true" value="#{transactionController.analysisDictum}" width="400" height="150">
					</rich:editor>
	
					<br/>
					<br/>
					<strong>#{messages['analysis.additional_observations']}</strong>
					<rich:separator lineType="solid"/>
					<br/>
					<rich:editor readonly="true" value="#{transactionController.additionalObservations}" width="400" height="150">
					</rich:editor>
				</div>
			</rich:tab>
		</rich:tabPanel>
	</h:panelGroup>
	
</ui:composition>
